<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .box{
            width: 600px;
            height: 600px;
            margin: 0 auto;
            margin-top: 50px;
            background: lightgoldenrodyellow;
            position: relative;
        }
        .box1{
            width: 200px;
            height: 200px;
            background: lightpink;
            position: absolute;
            top:50%;
            left: 50%;
            margin-top: -100px;
            margin-left: -100px;
        }
    </style>
</head>
<body>
    <div class="box">
            <div class="box1">

            </div>
    </div>
</body>
</html>